﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="detail.aspx.vb" Inherits="WebScripting2013.detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="carsDb" Width="174px">
        <Columns>
            <asp:BoundField DataField="ModelName" HeaderText="ModelName" 
                SortExpression="ModelName" />
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Photo">
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="carsDb" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CarsConn %>" 
        ProviderName="<%$ ConnectionStrings:CarsConn.ProviderName %>" 
        SelectCommand="SELECT * FROM [ClassicCars] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
